package com.qpx.jxcstarterpay.config;


import com.qpx.jxcstarterpay.service.AlipayService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration()
@ConditionalOnClass({AlipayService.class})
public class AlipayAutoConfig {



    @Bean
    @ConditionalOnProperty(prefix="alipay",value = "enable",havingValue = "true")
    public AlipayService alipayService(){
        return new AlipayService();
    }
}
